<% form_for @project do |f| %>
  <%= f.error_messages %>
  <p>
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  
  <h3>WorkPackages</h3>
  <% f.fields_for :workpackages do |wp_form| %>
    <%= render :partial => 'workpackage', :locals => { :f => wp_form } %>
  <% end %>

  <p><%= add_child_link "New WorkPackage", :workpackage %></p>
  <%= new_child_fields_template(f, :workpackages)%>
  <p><%= f.submit "Submit" %></p>
<% end %>
<%= yield :workpackages_fields_template %>